package cam.School.Services;

import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

public class DocumentService {
	//ServiceMethods:
//		 -uploadDocument
//		 -downloadDocument
//		 -deleteDocument //Delete Document on the database after it will be downloaded
//		 -
//		 -
//		
	@POST
	@Path("/uploadDocument?data={data}&objectId={objectId}")
	@Produces(MediaType.TEXT_XML)
	public boolean uploadDocument(@PathParam("data")byte data,@PathParam("objectId") int objectId) {				  
		//TODO data:array of byte
		// objectId: Id of the person or infrastructur wo belongs to
		return true; //or false 		
	}
	
	@GET
	@Path("/downloadDocument?objectId={objectId}")
	@Produces(MediaType.TEXT_XML)
	public byte downloadDocument(@PathParam("objectId") int objectId) {	
		// objectId: Id of the person or infrastructur wo belongs to
		return (Byte) null; // 		
	}
	
	@POST
	@Path("/deleteDocument?docId={docId}")
	@Produces(MediaType.TEXT_XML)
	public boolean deleteDocument(@PathParam("docId") int docId) {	
		//TODO docId: 
		return true; // or false		
	}

}
